const Port = 3000
const Koa = require('koa');
const app = new Koa();

const My_router = require('./my_router')


const serve = require('koa-static');
app.use(serve(__dirname + '/static'));
var cors = require('koa-cors');
app.use(cors());
const koaBody = require('koa-body');
app.use(koaBody({
    multipart: true,
    formidable: {
        maxFileSize: 1024 * 1024 * 200
    }
}));


app
    .use(My_router.router.routes())
    .use(My_router.router.allowedMethods());

console.log("我的服务器跑起来了....3000")
app.listen(Port);